<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/jsp/taglib.jsp" %>
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed brand" data-toggle="collapse"
                    data-target="#navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="<spring:url value="/" /> " class="navbar-brand" style="color: #004a86">
                <img src="<spring:url value="/images/logo/logo_blue.png" />"/>
            </a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="nav-choose"><a href="<spring:url value="/blogList"/>">文章</a></li>
                <li class="nav-choose"><a href="<spring:url value="/postList"/>">讨论</a></li>
                <li class="nav-choose"><a href="<spring:url value="/activityList"/>">活动</a></li>
                <li class="nav-choose"><a href="<spring:url value="/CourseIndex"/>">课程</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown loginMenu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">
                        <c:choose>
                            <c:when test="${empty sessionUser}">
                                登陆注册
                            </c:when>
                            <c:otherwise>
                                个人中心
                            </c:otherwise>
                        </c:choose>
                        <span class="glyphicon glyphicon-menu-down"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <c:choose>
                            <c:when test="${empty sessionUser}">
                                <li><a href="<spring:url value="/loginPage" />">登录</a></li>
                                <li><a href="<spring:url value="/registerPage" />">注册</a></li>
                            </c:when>
                            <c:otherwise>
                                <li><a href="<spring:url value="/personalCenter/index/${sessionUser.userId}"/>" class="">个人中心</a></li>
                                <li><a href="<spring:url value="/wallet/index"/>" class="">优得钱包</a></li>
                                <li><a href="<spring:url value="/logout" />">退出登陆</a></li>
                            </c:otherwise>
                        </c:choose>


                        <%--<li><a href="#">Action</a></li>--%>
                        <%--<li><a href="#">Another action</a></li>--%>
                        <%--<li role="separator" class="divider"></li>--%>
                        <%--<li><a href="#">Something else here</a></li>--%>
                        <%--<li role="separator" class="divider"></li>--%>
                        <%--<li><a href="#">Separated link</a></li>--%>
                    </ul>
                </li>
                <li class="nav-choose">
                    <a href="<spring:url value="/chat/index"/>"><img src="<spring:url value="/images/talk/talk.png" />"></a>
                </li>
                <li class="nav-choose">
                    <a href="<spring:url value="/notify/index"/>"><img
                            src="<spring:url value="/images/talk/message.png" />"></a>
                </li>
                <%--<li class="dropdown">--%>
                <%--<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon homeMenu"></span></a>--%>
                <%--<ul class="dropdown-menu">--%>
                <%--<li><a href="#">Action</a></li>--%>
                <%--<li><a href="#">Another action</a></li>--%>
                <%--<li role="separator" class="divider"></li>--%>
                <%--<li><a href="#">Something else here</a></li>--%>
                <%--<li role="separator" class="divider"></li>--%>
                <%--<li><a href="#">Separated link</a></li>--%>
                <%--</ul>--%>
                <%--</li>--%>
            </ul>
        </div>
    </div>
</nav>
